/*
 * @Date: 2023-05-22 13:02:01
 * @LastEditTime: 2023-05-25 21:46:43

 * 介绍:
 */
import type {
  IBasicDataFeed,
  ChartingLibraryWidgetOptions,
  TradingTerminalWidgetOptions,
  IDatafeedQuotesApi,
  IExternalDatafeed,
  IDatafeedChartApi,
} from "./lib/charting_library/charting_library.min";
import CkLineChart from "./CtradingView.vue";

type DatafeedClass = IDatafeedQuotesApi & IExternalDatafeed & IDatafeedChartApi;
type Datafeed = IBasicDataFeed | (IBasicDataFeed & IDatafeedQuotesApi);
type CkLineChartRef = InstanceType<typeof CkLineChart>;
type Options = Partial<
  ChartingLibraryWidgetOptions | TradingTerminalWidgetOptions
>;
export type * from "./lib/charting_library/charting_library.min";
export type { Datafeed, CkLineChartRef, Options, DatafeedClass };
export default CkLineChart;
export function useCtradingViewRef() {
  return ref<InstanceType<typeof CkLineChart>>();
}

export interface ThemeCfg {
  bg: string;
  color: string;
  borderColor: string;
}
